<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
Class User extends CI_Model
{

    function __construct()
    {
        parent::__construct();
	$this->load->database();
    }

function login($username, $password)

    {
	/*
        $query = $this->db->query("SELECT * FROM fbapp_fb");
        return $query->result_array();
	*/
	
        $query = $this->db->query("SELECT * FROM fbapp_fb WHERE fb_username ='".$username."' AND fb_password ='".$password."'");

	$temp['array'] = $query->result_array();

	if(count($temp['array']) == 1)
	{
	    return $query->result_array();
	}
	else
	{
	    return FALSE;
	} 
    }
}
?>
